package com.example.business_oa.controller;

import com.example.business_oa.service.HyUserService;
import com.example.comment_oa.pojos.SysUser;
import com.example.comment_oa.response.AjaxResponse;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@CrossOrigin
@RequestMapping("/businessOa")
public class HyUserController {
    @Resource
    HyUserService userService;

    //员工入职时新增员工账号
    @PostMapping("/addUser")
    public AjaxResponse addUser(@RequestBody SysUser sysUser){
        int i = userService.addUser(sysUser);
        return AjaxResponse.success(i);
    }
}
